package action.command;

import java.util.ArrayList;
import java.util.List;

public class CommandQueue {
    private final List<Command> commands=new ArrayList<>();
    public void execute(){
        commands.forEach(Command::execute);
    }

    public boolean addCommand(Command command){
        return commands.add(command);
    }

    public boolean removeCommand(Command command){
        return commands.remove(command);
    }
}
